<%--
  Created by IntelliJ IDEA.
  User: 叶叶
  Date: 2022/2/18
  Time: 14:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>物料状态查询</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.15.3/dist/bootstrap-table.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <script src="https://unpkg.com/bootstrap-table@1.15.3/dist/bootstrap-table.min.js"></script>
    <script src="../js/bootstrap-table-zh-CN.min.js"></script>
</head>
<body>
<div class="container" id="div1">
    <span style="color: blue;font-family: 华文宋体"><marquee width=400 direction=left align=middle><span>您正在做的业务是：生产管理--产品生产工序设计--产品生产工序设计单查询</span></marquee></span>
    <div class="row">
        <form class="form-inline">
            <div class="container" style="margin: 10px">
                <select class="form-control" id="firstKindName">
                    <option value="">请选择产品I级分类</option>
                    <option value="电子">电子</option>
                </select>
                <select class="form-control" id="secondKindName">
                    <option value="">请选择产品II级分类</option>
                    <option value="计算机">电子/计算机</option>
                </select>
                <select class="form-control" id="thirdKindName">
                    <option value="">请选择产品III级分类</option>
                    <option value="服务器">电子/计算机/服务器</option>
                </select>
                <select class="form-control" id="productName">
                    <option value="">请选择产品</option>
                </select>
                <select class="form-control" id="designModuleTag">
                    <option value="">请选择设计状态</option>
                    <option value="G002-0">等待</option>
                    <option value="G002-1">执行</option>
                    <option value="G002-2">完成</option>
                    <option value="G002-3">不通过</option>
                </select>
                <span style="font-family: 华文中宋">建档时间:</span><input class="form-control" type="date" id="register_time1"><span>至</span>
                <input class="form-control" type="date" id="register_time2">
                <input type="button" class="btn btn-primary" id="submit_select" value="查询" >
                <!--                  <button class="btn btn-primary" id="submit_select">查询</button>-->
            </div>
        </form>
    </div>
    <!--      <div class="row" style="margin-top: 20px">-->
    <!--          <div class="col-10">-->
    <!--          </div>-->
    <!--          <div class="col-2">-->
    <!--              <button class="btn btn-primary" data-toggle="modal" data-target="#myModal" onclick="add1()">添加</button>-->
    <!--          </div>-->
    <!--      </div>-->
    <div class="container">
        <caption>
            <div style="float: right;margin-bottom: 5px">
            </div>
        </caption>
        <div class="row">
            <table id="table" class="table table-hover table-bordered" style="width: 1100px">
                <thead>

                </thead>
                <tbody>

            </table>
        </div>
    </div>
</div>
</div>
</div>
</div>
<script>
    $(function () {
        $("#table").bootstrapTable({
            method:"post",
            //请求类型
            contentType:"application/json",
            //请求地址
            url:"/cha/fy1",
            striped:true,
            //初始页数
            pageNumber:1,
            pagination: true,
            sidePagination:"server",
            pageSize:2,
            pageList:[2,4,6,8,10],
            queryParams:function (param) {
                return {
                    page: (param.offset / param.limit) + 1,
                    pageNum: param.limit,
                    firstKindName:document.getElementById("firstKindName").value,
                    secondKindName:document.getElementById("secondKindName").value,
                    thirdKindName:document.getElementById("thirdKindName").value,
                    productName:document.getElementById("productName").value,
                    designModuleTag:document.getElementById("designModuleTag").value,
                    register_time1:document.getElementById("register_time1").value,
                    register_time2:document.getElementById("register_time2").value
                }
            },
            columns:[
                {title:"设计单编号",field:"designId",align:"center"},
                {title:"产品编号",field:"productId",align:"center"},
                {title:"产品名称",field:"productName",align:"center"},
                {title:"设计单状态",field:"designModuleTag",align:"center",formatter:function (value) {
                        if (value=="G002-0"){
                            return "等待"
                        }
                        if (value=="G002-1"){
                            return "执行"
                        }
                        if (value=="G002-2"){
                            return "通过"
                        }
                        if (value=="G002-3"){
                            return "不通过"
                        }
                    }},
                {title:"审核状态",field:"designModuleTag",align:"center",formatter:function (value1) {
                        if (value1=="G002-0"){
                            return "等待"
                        }
                        if (value1=="G002-1"){
                            return "执行"
                        }
                        if (value1=="G002-2"){
                            return "通过"
                        }
                        if (value1=="G002-3"){
                            return "不通过"
                        }

                    }}
            ]
        })
        $("#submit_select").click(function () {
            $("#table").bootstrapTable("refresh");
        })
    })
</script>
</body>
</html>
